package ar.com.jendrix.common.web.util;

import java.util.List;

import javax.faces.context.FacesContext;

public final class RoleUtil {
	/**
     */
	public static final Boolean inRole(String role) {
		return FacesContext.getCurrentInstance().getExternalContext().isUserInRole(role);
	}

	/**
     */
	public static final Boolean inRole(List<String> roleList) {
		for (String role : roleList) {
			if (inRole(role)) {
				return Boolean.TRUE;
			}
		}
		return Boolean.FALSE;
	}
}